package com.ruoyi.reviews.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.reviews.mapper.BookReviewsMapper;
import com.ruoyi.reviews.domain.BookReviews;
import com.ruoyi.reviews.service.IBookReviewsService;

/**
 * 书籍评论Service业务层处理
 * 
 * @author 张队
 * @date 2025-05-11
 */
@Service
public class BookReviewsServiceImpl implements IBookReviewsService 
{
    @Autowired
    private BookReviewsMapper bookReviewsMapper;

    /**
     * 查询书籍评论
     * 
     * @param id 书籍评论主键
     * @return 书籍评论
     */
    @Override
    public BookReviews selectBookReviewsById(Long id)
    {
        return bookReviewsMapper.selectBookReviewsById(id);
    }

    /**
     * 查询书籍评论列表
     * 
     * @param bookReviews 书籍评论
     * @return 书籍评论
     */
    @Override
    public List<BookReviews> selectBookReviewsList(BookReviews bookReviews)
    {
        return bookReviewsMapper.selectBookReviewsList(bookReviews);
    }

    /**
     * 新增书籍评论
     * 
     * @param bookReviews 书籍评论
     * @return 结果
     */
    @Override
    public int insertBookReviews(BookReviews bookReviews)
    {
        return bookReviewsMapper.insertBookReviews(bookReviews);
    }

    /**
     * 修改书籍评论
     * 
     * @param bookReviews 书籍评论
     * @return 结果
     */
    @Override
    public int updateBookReviews(BookReviews bookReviews)
    {
        return bookReviewsMapper.updateBookReviews(bookReviews);
    }

    /**
     * 批量删除书籍评论
     * 
     * @param ids 需要删除的书籍评论主键
     * @return 结果
     */
    @Override
    public int deleteBookReviewsByIds(Long[] ids)
    {
        return bookReviewsMapper.deleteBookReviewsByIds(ids);
    }

    /**
     * 删除书籍评论信息
     * 
     * @param id 书籍评论主键
     * @return 结果
     */
    @Override
    public int deleteBookReviewsById(Long id)
    {
        return bookReviewsMapper.deleteBookReviewsById(id);
    }
}
